/* Theme Variables */
:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --hover-bg: #f1f5f9;
    --error-bg: #fee2e2;
    --error-border: #fecaca;
    --error-text: #dc2626;
    --success-bg: #dcfce7;
    --success-border: #bbf7d0;
    --success-text: #16a34a;
    --shepherd-bg: var(--bg-primary);
    --shepherd-text: var(--text-primary);
    --shepherd-border: var(--border-color);
    --shepherd-button-primary: var(--accent-primary);
    --shepherd-button-text: white;
}

:root[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-primary: #60a5fa;
    --accent-secondary: #93c5fd;
    --border-color: #334155;
    --card-bg: #1e293b;
    --input-bg: #1e293b;
    --hover-bg: #334155;
    --error-bg: #451a1a;
    --error-border: #991b1b;
    --error-text: #fca5a5;
    --success-bg: #14532d;
    --success-border: #166534;
    --success-text: #86efac;
    --shepherd-bg: var(--bg-secondary);
    --shepherd-text: var(--text-primary);
    --shepherd-border: var(--border-color);
    --shepherd-button-primary: var(--accent-primary);
    --shepherd-button-text: white;
}

.shepherd-modal-overlay-container {
    background: rgba(0, 0, 0, 0.5);
}

.shepherd-element {
    background: var(--shepherd-bg) !important;
    color: var(--shepherd-text) !important;
    border: 1px solid var(--shepherd-border) !important;
    border-radius: 0.5rem !important;
}

.shepherd-text {
    color: var(--shepherd-text) !important;
}

.shepherd-header {
    background: var(--shepherd-bg) !important;
    border-bottom: 1px solid var(--shepherd-border) !important;
}

.shepherd-title {
    color: var(--shepherd-text) !important;
    font-size: 1.25rem !important;
}

.shepherd-cancel-icon {
    color: var(--shepherd-text) !important;
}

.shepherd-button {
    background: var(--shepherd-button-primary) !important;
    color: var(--shepherd-button-text) !important;
    border-radius: 0.375rem !important;
}

.shepherd-button:not(:disabled):hover {
    background: var(--accent-secondary) !important;
}

.shepherd-button.shepherd-button-secondary {
    background: transparent !important;
    color: var(--shepherd-text) !important;
    border: 1px solid var(--shepherd-border) !important;
}

.shepherd-arrow:before {
    background: var(--shepherd-bg) !important;
    border: 1px solid var(--shepherd-border) !important;
}

/* Base Styles */
body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: Arial, sans-serif; 
    margin: 20px; 
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

/* Navigation */
.modern-nav {
    background: var(--bg-primary);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}

.nav-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.nav-icon:hover {
    transform: scale(1.05);
}

/* Cards */
.material-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.material-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.modern-input {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modern-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--accent-primary);
}

/* Buttons */
.material-button {
    background: var(--accent-primary);
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.my-swal {
    z-index: 9999;
}

/* Optional: Custom styling for SweetAlert */
.swal2-popup {
    font-size: 0.9rem !important;
    border-radius: 0.5rem !important;
}

.swal2-title {
    font-size: 1.25rem !important;
}

.modern-input.disabled,
.material-button.disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.material-button.disabled {
    border-color: #d1d5db;
}

textarea.disabled {
    resize: none;
}

.material-button-2 {
    background: var(--accent-primary);
    color: rgb(23, 87, 236);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.material-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    background: var(--accent-secondary);
}

.material-button:active {
    transform: translateY(0);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* Section Titles */
.section-title {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Tags */
.tag-input-container {
    display: flex;
    gap: 0.5rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.modern-tag {
    background: var(--accent-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color 0.2s ease;
}

.modern-tag button {
    background: none;
    border: none;
    color: white;
    padding: 0;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.modern-tag button:hover {
    opacity: 1;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Help Text */
.help-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Prompt Container */
.prompt-container {
    display: flex;
    gap: 0.5rem;
}

.prompt-container textarea {
    flex: 1;
    min-height: 200px;
    resize: vertical;
}

/* Provider Settings */
.provider-settings {
    display: none;
}

/* Responsive Design */
@media (max-width: 640px) {
    .material-card {
        padding: 1rem;
    }

    .prompt-container {
        flex-direction: column;
    }

    .tag-input-container {
        flex-direction: column;
    }

    .theme-toggle {
        top: auto;
        bottom: 1.25rem;
        color:#1a52d5;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-secondary);
    border-radius: 4px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Tooltip Custom Theme */
.tippy-box[data-theme~='custom'] {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}

.tippy-box[data-theme~='custom'] .tippy-content {
    padding: 0;
}

.tippy-box[data-theme~='custom'] .tooltip-content {
    font-size: 0.875rem;
    line-height: 1.4;
}

.tippy-box[data-theme~='custom'][data-placement^='right'] > .tippy-arrow::before {
    border-right-color: var(--border-color);
}

.tippy-box[data-theme~='custom'] code {
    font-family: monospace;
    background-color: var(--input-bg);  /* Nutzt die Input-Hintergrundfarbe */
    border: 1px solid var(--border-color);
}

/* Mobile adjustments for tooltip */
@media (max-width: 768px) {
    .tippy-box[data-theme~='custom'] {
        max-width: 90vw !important;  /* Override default max-width on mobile */
    }

    .tippy-box[data-theme~='custom'][data-placement^='bottom'] > .tippy-arrow::before {
        border-bottom-color: var(--border-color);
    }

    .tooltip-content {
        font-size: 0.875rem !important;  /* Slightly smaller font on mobile */
    }

    .tooltip-content code {
        word-break: break-all;  /* Break long URLs */
    }

    /* Adjust padding for better mobile display */
    .tooltip-content .p-2 {
        padding: 0.75rem !important;
    }
}

.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .checkbox-container input[type="checkbox"] {
    margin-right: 5px;
  }

  @media (max-width: 600px) {
    .checkbox-container {
      flex-direction: column;
    }
  }

/* Dark mode adjustments */
[data-theme="dark"] .tippy-box[data-theme~='custom'] {
    background-color: var(--bg-secondary);
}

/* Tab Navigation Styles */
.tab-navigation {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
    padding-top: 1rem;
}

.tab-button {
    position: relative;
    transition: all 0.3s ease;
    border-color: transparent;
}

.tab-button.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tab-button:not(.active):hover {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Tab Content Styles */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* Navigation Button Styles */
#prevBtn, #nextBtn, #submitBtn {
    min-width: 120px;
}

/* Progress Indicator */
.progress-bar {
    height: 4px;
    background: var(--border-color);
    margin-top: 1rem;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
    .tab-navigation {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        white-space: nowrap;
    }
}